#!/bin/bash

test1 () 
{
        echo ""
        echo "Test 1:"
        java compiler/Parser ../data/test1.txt
}

test2 () 
{
        echo ""
        echo "Test 2:"
        java compiler/Parser ../data/Test-Aufgabe-1.txt
}

test3 () 
{
        echo ""
        echo "Test 3:"
        java compiler/Parser ../data/myprog.txt
}



if [ -d bin_ ]; then
   rm -R bin_
fi

mkdir bin_
jflex src/compiler/flex.flex
#javac -d bin_ src/nodes/AbstractNode.java
javac -cp bin_ -d bin_ -sourcepath src src/compiler/Parser.java

cd bin_

case "$1" in
"1")
	test1;;
"2")
	test2;;
"3")
	test3;;
*)
	test1
	test2
	test3;;
esac

cd ..
